<!DOCTYPE html>

<html class="no-js">

<head>
  <meta charset="utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <title></title>
  <meta name="description" content="" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <script src="https://cdn.staticfile.org/axios/0.19.0-beta.1/axios.js"></script>
  <script src="../../cdn/vue/vue.global.min.js"></script>
  <link rel="stylesheet" href="../../cdn/element-plus/index.css" />
  <script src="../../cdn/element-plus/index.full.min.js"></script>

  <link rel="stylesheet" href="../../../lib/index.css" />
  <script src="../../../lib/avue.js"></script>
  <style>
    body,
    html,
    #app {
      height: 100%;
    }

    #app {
      background-size: 30px 30px, 30px 30px;
      background-image: linear-gradient(rgba(0, 0, 0, .1) 1px, transparent 0px), linear-gradient(90deg, rgba(0, 0, 0, .1) 1px, transparent 0px);
    }
  </style>
</head>

<body>
  <div id="app">
    <div style="position:relative;height:400px;">
      <avue-draggable :left="200" :top="200" @blur="handleBlur" @focus="handleFocus">
        <div style="width:200px;height:200px;background:red">
        </div>
      </avue-draggable>
      <avue-draggable :left="500" :top="200" :scale="3">
        <div style="width:200px;height:200px;background:red">
        </div>
      </avue-draggable>
    </div>
  </div>
</body>

</html>

<script>
  var app = Vue.createApp({
    data() {
      return {
        value: ''
      }
    },
    methods: {
      handleFocus() {
        console.log('focus')
      },
      handleBlur() {
        console.log('blur')
      }
    }
  })
  app.use(ElementPlus)
  app.use(AVUE)
  app.mount('#app')
</script>